//
//  TextSwitchCell.m
//  wanzhaoIM
//
//  Created by liuyuantao on 15/5/5.
//  Copyright (c) 2015年 liuyuantao. All rights reserved.
//

#import "TextSwitchCell.h"

@implementation TextSwitchCell

- (void)awakeFromNib
{


}


- (IBAction)changeSetting:(UISwitch *)swith
{
    
//    NSUserDefaults *selectDetaults = [NSUserDefaults standardUserDefaults];
//    [selectDetaults setBool:swith.on forKey:@"addressBookWifiUpdata"];
//    [selectDetaults synchronize];

    if ([self.delegate respondsToSelector:@selector(SwitchCellDidChangeSettingWithIndexPath:settingValue:)]) {
        [self.delegate SwitchCellDidChangeSettingWithIndexPath:self.indexPath settingValue:swith.isOn];
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)layoutSubviews
{
    [super layoutSubviews];
     _seperatorLine.frame = CGRectMake(15, self.frame.size.height-0.5f, self.frame.size.width-15, 0.5f);
}
@end
